package com.zw.stock_sell_storage.controller;

import com.zw.stock_sell_storage.dto.PermissionDto;
import com.zw.stock_sell_storage.dto.RoleDto;
import com.zw.stock_sell_storage.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/permission")
public class PermissionController {
    @Autowired
    IPermissionService iPermissionService;
    @RequestMapping("/queryPermissionByUserId")
    public List<PermissionDto> queryPermissionByUserId(@RequestBody List<RoleDto> roleList){
        return iPermissionService.queryPermissionByUserId(roleList);
    }
    @RequestMapping("/queryAllPermission")
    public List<PermissionDto> queryAllPermission(){
        return iPermissionService.queryAllPermission();
    }
}
